package com.yaxi.multipkid

import android.app.Application
import android.content.pm.ApplicationInfo
import android.content.pm.PackageManager
import android.util.Log
import java.util.*

class MyApplication : Application() {
    private val tag: String = "MyApplication"

    override fun onCreate() {
        super.onCreate()
        Log.i(tag,getApplicationMetaData())
    }


    fun getApplicationMetaData():String {
        val applicationInfo = packageManager.getApplicationInfo(packageName, PackageManager.GET_META_DATA)
        val appKey = applicationInfo.metaData.getString("appKey")
        val appicon = applicationInfo.metaData.getString("appIcon")
        return String.format(Locale.CHINESE,"%s;\n%s",appKey,appicon)
    }
}